﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpML.Api.Abstraction;
using SharpML.Api.Abstraction.Plugin;
using System.ComponentModel;
using SharpML.Api.Types;
using SharpML.Api.Extensions;

namespace SharpML.Adaptors.MNIST
{
    [Description("MNIST Handwritten Digits")]
    public class Adaptor : PatternDataAdaptor
    {
        public override void Initialize( string path )
        {
            if( PatternData == null )
                PatternData = new Digits( path );

            InputSize = 28 * 28;
            OutputSize = 10;
        }

        public override Api.Interfaces.IPluginConfiguration Gui
        {
            get { return null; }
        }

        public override XmlSerializableDictionary<string,object> Settings
        {
            get
            {
                return Properties.Settings.Default.Serialize();
            }
            set
            {
                Properties.Settings.Default.Deserialize( value );
            }
        }
    }
}
